
import Relay from "react-relay";
export default class savePackStep extends Relay.Mutation {

    getMutation() {
        return Relay.QL`mutation { savePackStep }`;
    }

    getVariables() {
        return {
            argsInput: {
                pdId:this.props.pdId,
                stepContent: this.props.stepContent,
                finishDate: this.props.finishDate,
                uid:this.props.uid,
                token: this.props.token,
                packStepId:this.props.packStepId,
                fileJson:this.props.fileJson,
                imgJson:this.props.imgJson
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on savePackStepPayload {
            clientMutationId
            savePackStep {
                    authorityId
                    totalResult
                    token
                    value
                    userId
                    packStep {
                        pdId
                        stepContent
                        imgJson
                        packStepId
                        fileJson
                    }
                    errorCode
                    id
             }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL` fragment on savePackStepPayload  {
                    clientMutationId
                      savePackStep {
                    authorityId
                    totalResult
                    token
                    value
                    userId
                    packStep {
                        pdId
                        stepContent
                        imgJson
                        packStepId
                        fileJson
                    }
                    errorCode
                    id
             }
                 }
            `]
        }];
    }

}
/**
 * Created by yoyoyk on 2017/5/9.
 */